<html>
<head>
</head>
<body style="background: transparent;">
    <script src="scripts/docstrap.lib.js"></script>
    <script src="scripts/lunr.min.js"></script>
    <script src="scripts/fulltext-search.js"></script>

    <script type="text/x-docstrap-searchdb">
    {"i18n_index.js.html":{"id":"i18n_index.js.html","title":"Source: i18n/index.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: i18n/index.js /* * @Description: 多语言文件 * @Author: kanglin * @Date: 2018-05-31 14:33:47 * @Copyright: Created by Panxsoft. */ import Vue from 'vue'; import VueI18n from 'vue-i18n'; import { parseLanguageParameter } from 'src/utils/helper'; import zhCN from './languages/zh-cn'; import enUS from './languages/en-us'; Vue.use(VueI18n); /** * 读取本地语言 */ const current_locale = parseLanguageParameter(); // getCurrentLocale(); // Vue.config.lang = current_locale; /** * 语言文件配置 */ const messages = { 'zh-CN': zhCN, 'en-US': enUS, }; /** * 配置 i18n */ export const i18n = new VueI18n({ locale: current_locale, // fallbackLocale: 'zh-CN', messages, }); /** * 切换语言 * @param {string} locale */ export function setLocale(locale) { // Vue.config.lang = locale; // iview 的语言切换方式 i18n.locale = locale; // i18n 的切换方式 } /** * 翻译 * @param {string} path * @param {object} options */ export function $t(path, options) { return i18n.t(path, options); } /** * 获取当前语言 * @return {string} language */ export function getLanguage() { return i18n.locale; } const language = { options: 'zh-CN', }; /** * 设置语言 * @return {string} language */ export function setLanguageOptions(name) { language.options = name; } /** * 获取语言选项 * @return {string} language */ export function getLanguageOptions() { return language.options; } /** * 后端的英文是 en , 中文是 zh-CN. */ export function getLanguageForBackEnd() { const MAP = { 'en-US': 'en-gb', 'zh-CN': 'zh-cn' }; const lang = getLanguage(); return MAP[lang] || 'zh-cn'; } × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_mixins_appHandle.js.html":{"id":"views_mixins_appHandle.js.html","title":"Source: views/mixins/appHandle.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/mixins/appHandle.js /* * app交互处理 * @Author: kanglin * @Date: 2018-12-24 11:04:40 * @Copyright: Created by Panxsoft. */ import { $t } from 'src/i18n'; /** * 方法: productSearch 首页导航查询的方法名 * @see https://panxsoft.coding.net/p/Direwolf-Web/task/172941 */ export const appHandle = { name: 'appHandle', methods: { /** * app的交互处理 * @param {String} fn {交互的方法名} * @param {Any} param {参数} */ handleApp(fn, param) { let req_param; if (typeof param === 'object') { req_param = JSON.stringify(param); } else { req_param = param; } try { // for iOS window.webkit.messageHandlers[fn].postMessage(req_param); /* eslint-disable no-console */ console.log('ios:', fn, param); } catch (e) { // for Android /* global DIREWOLF */ // for Android try { if (req_param) { DIREWOLF[fn](req_param); } else { DIREWOLF[fn](); } } catch (error) { console.log(error.message, fn, param); /* eslint-disable no-alert */ alert($t('common.app_error')); } } }, /** * 是否是ios * @return {Boolean} {true代表是ios} */ isIos() { const ua = navigator.userAgent; return !!ua.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/); }, /** * 是否是安卓 * @return {Boolean} {true代表是安卓} */ isAndroid() { const ua = navigator.userAgent; const isAndroid = ua.indexOf('Android') &gt; -1 || ua.indexOf('Adr') &gt; -1; return isAndroid; }, }, }; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"utils_axios-interceptors.js.html":{"id":"utils_axios-interceptors.js.html","title":"Source: utils/axios-interceptors.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: utils/axios-interceptors.js import axios from 'axios'; import Toast from 'cube-ui/lib/toast'; import { $t } from 'src/i18n'; /** 承接loading_toast的空对象 */ let loading_toast = null; /** * 请求发出前处理 * @param {Object} config axios请求前的配置对象 * @return {Object} axios请求前的配置对象 */ function axiosRequestResolve(config) { if (!config.hideLoading) { loading_toast = Toast.$create({ time: 0, txt: $t('common.wait'), }); loading_toast.show(); } return config; } /** * 对请求错误处理后件 * @param {Object} error axios请求报错后返回的error对象 * @return {Promise.&lt;*&gt;} 返回promise.reject */ function axiosRequestReject(error) { return Promise.reject(error); } /** * 对响成功处理 * @param {Object} response axios响应成功之后的返回体 * @return {Object} axios响应成功之后的返回体 */ function axiosResponseResolve(response) { if (loading_toast) { loading_toast.hide(); } return response; } /** * 响应错误处理 * @param {Object} error axios响应错误后的错误对象 * @return {Promise.&lt;*&gt;} */ function axiosResponseReject(error) { return Promise.reject(error); } /** 请求拦截器 */ axios.interceptors.request.use(axiosRequestResolve, axiosRequestReject); /** 响应拦截器 */ axios.interceptors.response.use(axiosResponseResolve, axiosResponseReject); export default axios; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"utils_utils.js.html":{"id":"utils_utils.js.html","title":"Source: utils/utils.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: utils/utils.js /** * 获取当前的时间 * @return {string} {格式化后的当前时间} */ export function getCurrentDate(mode) { const current_date = new Date(); const year = current_date.getFullYear(); let months = current_date.getMonth() + 1; let date = current_date.getDate(); if (months &lt; 10) { months = `0${months}`; } if (date &lt; 10) { date = `0${date}`; } if (mode) { switch (mode) { case 'year': return year; case 'y-m': return `${year}-${months}`; case 'month': return months; case 'day': return date; default: break; } } return `${year}-${months}-${date}`; } /** * 网址格式化 * @return {Object} {格式化网址之后得到的参数对象} */ export function formaturl() { const url_info = {}; const url_object = window.location.href.split('#').pop().split('?').pop(); url_object.split('&amp;').forEach((url) =&gt; { const [key, value] = url.split('='); if (key) { url_info[key] = value; } }); return url_info; } /** * 图片预加载 * @param {array} src_arrs {图片链接数组} * @return {array} {加载后的图片数组} */ export function imgPreLoad(src_arrs) { const imgs = []; src_arrs.forEach((src, index) =&gt; { const img = new Image(); img.src = src; imgs[index] = img; }); return imgs; } /** * 判断a数组是否包含b数组 * @param {array} a {判断的a数组} * @param {array} b {判断的b数组} * @return {Boolean} {true代表包含，false代表不包含} */ export function isContained(a, b) { if (!(a instanceof Array) || !(b instanceof Array)) return false; if (a.length &lt; b.length) return false; const aStr = a.toString(); for (let i = 0, len = b.length; i &lt; len; i += 1) { if (aStr.indexOf(b[i]) === -1) return false; } return true; } /** * 图片上传预览 * @param {file} file {图片文件} * @param {Object} _image {$refs获取节点} */ export function getUploadImage(file, _image) { const reader = new FileReader(); reader.onload = function (event) { _image.src = event.target.result; }; reader.readAsDataURL(file); } /** * 去除对象中的空值 * @param {Object} param {需要进行处理的对象} * @return {Object} {去除完毕的对象} */ export function deleteEmptyValue(param) { const query_param = {}; Object.keys(param).forEach((key) =&gt; { const value = param[key]; if (value &amp;&amp; value.length) { if (value.length &gt; 0) { query_param[key] = value; } } else if (String(value)) { query_param[key] = value; } }); return query_param; } /** *毫秒转化时分秒 *@param {Number} date {需要转化的毫秒} *@return {undefined} */ export function conversionTime(date) { let hh = Math.floor(date / 3600); if (hh &lt; 10) hh = `0${hh}`; let mm = Math.floor((date - (hh * 3600)) / 60); if (mm &lt; 10) mm = `0${mm}`; let ss = Math.floor((date - (hh * 3600)) % 60); if (ss &lt; 10) ss = `0${ss}`; const time = `${hh}:${mm}:${ss}`; return time; } /** * 调整模态框的水平居中 * @return {undefined} */ export function resizeModal() { const modals = [...document.querySelectorAll('.ivu-modal-wrap')]; if (!modals || modals.length === 0) return; const side_menu = document.querySelector('.layout-side-menu'); modals.forEach((modal) =&gt; { modal.style.paddingLeft = `${side_menu.offsetWidth}px`; }); } × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"utils_helper.js.html":{"id":"utils_helper.js.html","title":"Source: utils/helper.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: utils/helper.js /* * @Description: helper 方法 * @Author: kanglin * @Date: 2018-06-08 11:18:50 * @Copyright: Created by Panxsoft. */ import qs from 'qs'; /** * 包装一个延时函数\b * * @param {function} callback * @param {int} millsecond */ export function delay(callback, millsecond) { let timer = null; return function delayWorker() { if (timer) clearTimeout(timer); timer = setTimeout(callback, millsecond); }; } /** * 解析当前地区 * @returns {string} locale */ export function getCurrentLocale() { let locale = 'zh-CN'; const locale_value = localStorage.getItem('locale'); if (typeof locale_value === 'string') { locale = locale_value; } return locale; } export function getBrowserLanguage() { const first = window.navigator.languages ? window.navigator.languages[0] : null; const lang = first || window.navigator.language || window.navigator.browserLanguage || window.navigator.userLanguage; return lang; } /** * 解析语言参数 优先选择 url search 然后是浏览器环境 (navigator.languages) 最后默认zh-CN * @return {string} language zh-CN OR en-US */ export function parseLanguageParameter() { const LANGUAGES = { 'en-US': 'en-US', 'zh-CN': 'zh-CN', en: 'en-US', zh: 'zh-CN', }; const search = window.location.search.replace(/^\\?/, ''); const { lang } = qs.parse(search); const browserLanguage = getBrowserLanguage(); return LANGUAGES[lang] || LANGUAGES[browserLanguage] || LANGUAGES['zh-CN']; } /** * 解析query string * @return {object} query information */ export function parseQueryString() { const query_string = window.location.search.replace(/^\\?/, ''); return qs.parse(query_string); } /** * 读取hidden属性 * @return {String|null} */ export function getHiddenProp() { const prefixes = ['webkit', 'moz', 'ms', 'o']; // if 'hidden' is natively supported just return it if ('hidden' in document) return 'hidden'; // otherwise loop over all the known prefixes until we find one for (let i = 0; i &lt; prefixes.length; i = +1) { if ((`${prefixes[i]}Hidden`) in document) { return `${prefixes[i]}Hidden`; } } // otherwise it's not supported return null; } /** * 获取 visibilityChange 的事件在当前浏览器的时间名; * @return {String|null} EventName */ export function getVisibilityChangeEventName() { const hideProp = getHiddenProp(); let eventName = null; if (hideProp) { eventName = `${hideProp.replace(/[H|h]idden/, '')}visibilitychange`; } return eventName; } export function getVisibilityState() { const prefixes = ['webkit', 'moz', 'ms', 'o']; if ('visibilityState' in document) return 'visibilityState'; for (let i = 0; i &lt; prefixes.length; i = +1) { if ((`${prefixes[i]}VisibilityState`) in document) { return `${prefixes[i]}VisibilityState`; } } // otherwise it's not supported return null; } /** * 获取当前页面hide状态 */ export function isHidden() { const prop = getHiddenProp(); if (!prop) return false; return document[prop]; } × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_mixins_formatPrice.js.html":{"id":"views_mixins_formatPrice.js.html","title":"Source: views/mixins/formatPrice.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/mixins/formatPrice.js /* * 价格格式化的mixins * @Author: ljb * @Date: 2018-11-14 15:11:02 * @Last Modified by:ljb * @Last Modified time: 2018-11-14 15:11:02 */ export const formatPrice = { name: 'formatPrice', data() { return { }; }, methods: { /** * 格式化价格，并改变显示 * @param {String|Number} price {价格} * @return {String} {格式化后的价格} */ formatPrice(price) { return parseFloat(price).toFixed(2); }, }, }; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"utils_dom-helper.js.html":{"id":"utils_dom-helper.js.html","title":"Source: utils/dom-helper.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: utils/dom-helper.js /* * dom帮助函数 * @Author: ljb * @Date: 2019-01-02 10:07:35 * @Last Modified by: ljb * @Last Modified time: 2019-01-03 15:06:09 */ /** * 设置当前节点高度为屏幕可视高度 * @param {Object} elem {节点对象} */ export function setMinHeightToInnerHeight(elem) { elem.style.height = `${window.innerHeight}px`; } /** * 动态创建style标签并插入head标签里面 * @param {String} styleName {需要插入的style标签名} */ export function importStyle(styleName) { let style_name = 'default'; if (styleName) style_name = styleName; /* eslint-disable rule */ import(`src/assets/theme/${style_name}.less`); /* eslint-enable rule */ } × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_mixins_easeScroll.js.html":{"id":"views_mixins_easeScroll.js.html","title":"Source: views/mixins/easeScroll.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/mixins/easeScroll.js /* * 滚动动画mixins * @Author: ljb * @Date: 2018-11-14 15:11:15 * @Last Modified by: kanglin * @Last Modified time: 2018-12-26 10:13:41 */ export default { name: 'easeScroll', methods: { /** * 滑动动画 * @param {Number} ex {滑动结束的x值，默认为0} * @param {Number} ey {滑动结束的y值，默认为0} * @param {Number} speed {滑动的速度反比，值越大滑动越慢} * @param {Boolean} is_limited {是否限制结束的x，y值} * @return {undefined} */ easeScrollTo(ex = 0, ey = 0, speed = 0.4, is_limited = true) { if (speed &gt;= 1)speed = 0.9; if (is_limited) { [ex, ey] = this.limitDestination(ex, ey); } const frame = requestAnimationFrame(() =&gt; { const sx = window.scrollX; const sy = window.scrollY; let x_desc = (sx - ex) * speed; let y_desc = (sy - ey) * speed; x_desc = x_desc &gt; 0 ? Math.floor(x_desc) : Math.ceil(x_desc); y_desc = y_desc &gt; 0 ? Math.floor(y_desc) : Math.ceil(y_desc); const frame_dest_x = ex + x_desc; const frame_dest_y = ey + y_desc; if (Math.abs(ey - sy) &lt;= 2 &amp;&amp; Math.abs(ex - sx) &lt;= 2 ) { window.scrollTo(ex, ey); cancelAnimationFrame(frame); } else { window.scrollTo(frame_dest_x, frame_dest_y); this.easeScrollTo(ex, ey, speed); } }); }, /** * 限制结束处的x值和y值 * @param {Number} ex {滚动结束时的x值} * @param {Number} ey {滚动结束时的y值} * @return {Array} {滚动结束时的x，y值组成的数组} */ limitDestination(ex, ey) { if (ex &lt; 0) ex = 0; if (ey &lt; 0) ey = 0; if (ex &gt; document.body.scrollWidth - window.innerWidth) { ex = document.body.scrollWidth - window.innerWidth; } if (ey &gt; document.body.scrollHeight - window.innerHeight) { ey = document.body.scrollHeight - window.innerHeight; } return [ex, ey]; }, }, }; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"app.vue.html":{"id":"app.vue.html","title":"Source: app.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: app.vue /* * vue主入口 * @Author: ljb * @Date: 2018-11-14 09:49:26 * @Last Modified by: kanglin * @Last Modified time: 2019-01-04 15:19:22 */ &lt;style lang=\"less\" rel=\"stylesheet/less\"&gt; @import '~src/assets/css/common.less'; /*白色背景*/ .white-bg { background-color: @main-background; } /*白色背景 END*/ &lt;/style&gt; &lt;template&gt; &lt;div class=\"app\"&gt; &lt;router-view/&gt; &lt;!-- 返回顶部按钮 --&gt; &lt;transition name=\"translate-fade\"&gt; &lt;div v-show=\"show_btn\" class=\"back-top-btn\" @click=\"easeScrollTo(0,0)\"/&gt; &lt;/transition&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import { APP_DEBUG } from 'src/API_LIST'; import easeScroll from 'src/views/mixins/easeScroll'; /** * @vue-data {Boolean} [show_btn=false] 控制返回顶部的按钮的显隐 * @vue-methods {function} initListener 初始化事件监听 * @vue-methods {function} btnShowControl 返回顶部按钮的显隐控制 */ export default { mixins: [easeScroll], data() { return { show_btn: false, // 控制返回顶部的按钮的显隐 }; }, mounted() { this.initListener(); if (!APP_DEBUG) { /* global panxVConsole */ panxVConsole({ left: '0px', bottom: '0px' }); } }, beforeDestroy() { window.removeEventListener('scroll', this.btnShowControl); }, methods: { /** * 初始化事件监听 */ initListener() { window.addEventListener('scroll', this.btnShowControl); }, /** * 返回顶部按钮的显隐控制 */ btnShowControl() { const { scrollY } = window; const limited_y = 200; // 200是显示按钮的临界值 if (scrollY &gt; limited_y) { this.show_btn = true; } else { this.show_btn = false; } }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_article-detail.vue.html":{"id":"views_article-detail.vue.html","title":"Source: views/article-detail.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/article-detail.vue /* * 新闻详情 * @Author: ljb * @Date: 2018-11-21 11:43:19 * @Last Modified by: ljb * @Last Modified time: 2019-01-04 15:36:20 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; @deep : ~'&gt;&gt;&gt;'; .v-article-detail { .header{ position: fixed; width: 100%; z-index: 999; } background-color: #F9F9F9; padding-bottom: 24*@rem-per-px; .article-container { padding: 136*@rem-per-px 40*@rem-per-px 30*@rem-per-px; color: #232931; .article-title { font-size: 32*@rem-per-px; font-weight: bold; line-height: 45*@rem-per-px; } .article-date { line-height: 28*@rem-per-px; margin-top: 6*@rem-per-px; margin-bottom: 28*@rem-per-px; color: #BBBDC0; font-size: 20*@rem-per-px; } .article-image { width: 100%; height: 296*@rem-per-px; margin-bottom: 37*@rem-per-px; overflow: hidden; font-size: 0; img { width: 100%; height: 100%; } } .article-content { max-width: 100%; color: rgba(35, 41, 49, .8); line-height: 2; @{deep} img { max-width: 100% !important; } } .article-read { width: 100%; height: 28*@rem-per-px; margin-top: 28*@rem-per-px; font-size: 20*@rem-per-px; font-weight: 500; line-height: 28*@rem-per-px; color: rgba(15, 15, 15, .45); } } } &lt;/style&gt; &lt;template&gt; &lt;div class=\"v-article-detail\"&gt; &lt;div class=\"header\"&gt; &lt;page-header :title=\"$t('routers.article_detail')\" @back=\"backToHome\"/&gt; &lt;/div&gt; &lt;div class=\"article-container white-bg\"&gt; &lt;div class=\"article-title\" v-text=\"articleContent.title\"/&gt; &lt;div class=\"article-date\" v-text=\"article_detail.date_added\"/&gt; &lt;div class=\"article-image\"&gt; &lt;img :src=\"article_detail.image\" alt=\"\"&gt; &lt;/div&gt; &lt;div class=\"article-content\" v-html=\"articleContent.description\"/&gt; &lt;div class=\"article-read\"&gt; {{ $t('article.read') + $t('common.colon') + articleReads }} &lt;/div&gt; &lt;/div&gt; &lt;recommendModule :products=\"recommend_products\"/&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import qs from 'qs'; import { ARTICLE_DETAIL } from 'src/API_LIST'; import { getLanguageForBackEnd } from 'src/i18n/index'; import recommendModule from 'src/views/module/detail-recommend-module'; import header from 'src/views/component/header'; import { formaturl } from 'src/utils/utils'; import { appHandle } from 'src/views/mixins/appHandle'; /** * 新闻详情 * @vue-data {Object} [article_detail={}] - 新闻详情 * @vue-data {array} [recommend_products=[]] - 推荐商品数组 * @vue-computed {Object} articleContent - 文章详细内容 * @vue-computed {number} articleReads - 文章阅读数 */ export default { name: 'ArticleDetail', components: { recommendModule, 'page-header': header, }, mixins: [appHandle], data() { return { article_detail: {}, // 新闻详情 recommend_products: [], // 推荐商品 }; }, computed: { // 简化文章内容的获取 articleContent() { return this.article_detail.filter_press_description_by_language || {}; }, articleReads() { return this.article_detail ? this.article_detail.hits : 0; }, }, mounted() { const article_id = this.getArticleId(); this.fetchArticleDetailAndProduct(article_id); }, methods: { /** * 处理返回事件 */ backToHome() { this.handleApp('back'); }, /** * 获取当前查看的新闻的详情id * @return {String} {新闻的详情id} */ getArticleId() { const url_params = formaturl(); // 格式化当前网址 return url_params ? url_params.article_id : ''; }, /** * 获取推荐商品列表 * @return {Promise} {请求推荐商品的promise} */ fetchArticleDetailAndProduct(id) { const param = { language: getLanguageForBackEnd(), }; const query_str = qs.stringify(param); return this.$http.get(`${ARTICLE_DETAIL}/${id}?${query_str}`) .then(({ data }) =&gt; { if (data.code !== 0) throw new Error(data.error); this.article_detail = data.press; this.recommend_products = data.recommend_products; }) .catch((err) =&gt; { const toast = this.$createToast({ type: 'error', time: 2000, txt: err.message, }); toast.show(); }); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_module_article-module.vue.html":{"id":"views_module_article-module.vue.html","title":"Source: views/module/article-module.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/module/article-module.vue /* * 特价商品模块 * @Author: ljb * @Date: 2018-11-15 17:20:45 * @Last Modified by: kanglin * @Last Modified time: 2019-01-04 16:27:30 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; /*最新文章样式*/ .article-area { width: 100%; margin-top: 16*@rem-per-px; .article-title { width: 100%; height: 88*@rem-per-px; line-height: 88*@rem-per-px; font-size: 28*@rem-per-px; color: rgba(0,0,0,.85); font-weight: bold; text-align: center; } .article-lists { padding-top: 16*@rem-per-px; } .gutter{ background: #F9F9F9; height: 16*@rem-per-px; } } /*最新文章样式 END*/ &lt;/style&gt; &lt;template&gt; &lt;section class=\"article-area\"&gt; &lt;div class=\"article-title\"&gt;{{ $t('home.newest_article') }}&lt;/div&gt; &lt;div class=\"article-lists white-bg\"&gt; &lt;article-item v-for=\"(item) in articles\" :key=\"item.press_id\" :title=\"item.title\" :count=\"item.hits\" :thumb=\"item.image\" @click.native=\"watchDetail(item.press_id)\"/&gt; &lt;/div&gt; &lt;div class=\"gutter\"/&gt; &lt;/section&gt; &lt;/template&gt; &lt;script&gt; import articleItem from 'src/views/component/article-item'; import { appHandle } from 'src/views/mixins/appHandle'; /** * @vue-prop {Object} [setting={}] - 包含新闻数组的对象 * @vue-computed {array} articles - 最新新闻 */ export default { name: 'ArticleModule', components: { articleItem, }, mixins: [appHandle], props: { setting: { type: Object, default() { return {}; }, }, }, data() { return { }; }, computed: { /** * 返回最新新闻 * @return {Array} {最新新闻的数组} */ articles() { return this.setting ? this.setting.presses : []; }, }, methods: { /** * 查看新闻详情 * @param {String} press_id {当前查看的新闻id} */ watchDetail(press_id) { const detail_url = `${window.location.origin + window.location.pathname}#/article-detail?article_id=${press_id}`; const param = { url: detail_url, }; this.handleApp('articleDetail', JSON.stringify(param)); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_module_banner-module.vue.html":{"id":"views_module_banner-module.vue.html","title":"Source: views/module/banner-module.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/module/banner-module.vue /* * banner轮播图模块 * @Author: ljb * @Date: 2018-11-15 17:28:07 * @Last Modified by: ljb * @Last Modified time: 2019-01-04 18:16:52 */ &lt;style lang=\"less\" scoped rel=\"stylesheet/less\" type=\"text/less\" &gt; @import '~src/assets/css/common.less'; @deep: ~\"&gt;&gt;&gt;\"; .swiper-container { .swiper-slide{ &amp;&gt;img{ max-width: 100%; height: auto; vertical-align: top; } } } .v-com-banner @{deep} .swiper-pagination-bullet-active{ background: #ffffff!important; } .v-com-banner @{deep} .swiper-pagination-bullet{ background: #afa3a4; } &lt;/style&gt; &lt;template&gt; &lt;div class=\"v-com-banner\"&gt; &lt;swiper ref=\"swiper\" :options=\"swiperOption\" style=\"height: 100%\"&gt; &lt;swiper-slide v-for=\"(item ,index) in getBanner\" :key=\"index\"&gt; &lt;img :src=\"item.image\" alt=\"\"&gt; &lt;/swiper-slide&gt; &lt;div slot=\"pagination\" class=\"swiper-pagination\"/&gt; &lt;/swiper&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import 'swiper/dist/css/swiper.css'; import { swiper, swiperSlide } from 'vue-awesome-swiper'; /** * banner轮播图模块 * @vue-prop {Object} [setting={}] 后端返回的组件数据 * @vue-data {Object} swiperOption swiper的配置 * @vue-data {string} [swiperOption.height=4.68px] 组件高度 * @vue-data {Boolean} [swiperOption.autoHeight=true] 是否高度随内容变化 * @vue-data {Object} [swiperOption.pagination.el=.swiper-pagination] 分页器元素 * @vue-data {number} [swiperOption.autoplay.delay=2500] 过渡时间 * @vue-data {Boolean} [swiperOption.autoplay.disableOnInteraction=false] 是否禁止autoplay * @vue-data {Boolean} [swiperOption.loop=false] 是否循环 * @vue-data {Function} [swiperOption.on.click=handleClick] 处理点击的回调 * @vue-computed {array} getBanner 返回banner列表数据 */ export default { name: 'Banner', components: { swiper, swiperSlide, }, props: { setting: { type: Object, default() { return {}; }, }, }, data() { return { swiperOption: { height: `${window.lib.flexible.px2rem(344)}rem`, autoHeight: true, // 高度随内容变化 pagination: { el: '.swiper-pagination', }, autoplay: { delay: 2500, disableOnInteraction: false, }, loop: true, on: { click: this.handleClick.bind(this), }, }, }; }, computed: { /** * 返回banner列表 * @return {Array} {最新新闻的数组} */ getBanner() { return this.setting ? this.setting.banner_images : []; }, }, methods: { /** * 点击转跳 */ handleClick() { if (this.$refs.swiper &amp;&amp; this.$refs.swiper.$children) { this.$refs.swiper.$children.forEach((element, index) =&gt; { if (/active/.test(element.$el.className)) { this.$emit('link', this.getBanner[index].link); } }); } }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_discovery.vue.html":{"id":"views_discovery.vue.html","title":"Source: views/discovery.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/discovery.vue /* * @Description: 发现页面 * @Author: kanglin * @Date: 2018-11-14 10:34:36 * @Copyright: Created by Panxsoft. */ &lt;style lang=\"less\" scoped rel=\"stylesheet/less\" type=\"text/less\" &gt; @import '~src/assets/css/common.less'; .discovery{ .articles{ background: #F9F9F9; list-style: none; padding-top: 16*@rem-per-px; } .articles__item{ margin-bottom: 16*@rem-per-px; } } &lt;/style&gt; &lt;template&gt; &lt;div class=\"discovery\"&gt; &lt;ul class=\"articles\"&gt; &lt;li v-for=\"(item,index) in articles\" :key=\"index\" class=\"articles__item\" @click=\"handleClick(item.press_id)\"&gt; &lt;article-card :cover=\"item.image\" :title=\"item.title\" :date=\"item.time_ago\" :count=\"item.hits\"/&gt; &lt;/li&gt; &lt;/ul&gt; &lt;infinite-loading ref=\"infiniteLoading\" @infinite=\"infiniteHandler\"&gt; &lt;div slot=\"spinner\"/&gt; &lt;div slot=\"no-more\" class=\"no-more\"&gt;{{ $t('common.no_more_data') }}&lt;/div&gt; &lt;/infinite-loading&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import { ARTICLE } from 'src/API_LIST'; import qs from 'qs'; import { getLanguageForBackEnd } from 'src/i18n'; import ArticleCard from 'src/views/component/article-card'; import { appHandle } from 'src/views/mixins/appHandle'; /** * 发现页面 * @vue-data {array} [articles=[]] - 文章列表的数组 * @vue-data {Object} query_info - 分页搜索的参数对象 * @vue-data {number} [query_info.page=1] - 分页搜索的页数 * @vue-data {number} [query_info.per_page=5] - 分页搜索的每页显示数 * @vue-data {string} [query_info.language=zh-cn] - 分页搜索的语言参数 */ export default { name: 'Discovery', components: { ArticleCard, }, mixins: [appHandle], data() { return { articles: [], query_info: { page: 1, per_page: 5, language: getLanguageForBackEnd(), }, }; }, methods: { /** * 是否最后一页 * @param {Number|String} page {当前需要判断的页码} * @param {Number|String} last_page {最后一页页码} * @return {Boolean} {true代表是最后一页} */ isLastPage(page, last_page) { return parseInt(page, 10) &gt; parseInt(last_page, 10); }, /** * 无限加载的handle函数 * @param {Object} $state {插件的状态管理} */ infiniteHandler($state) { this.fetchArticles() .then(({ data }) =&gt; { const { presses } = data; if (!this.isLastPage(presses.current_page, presses.last_page)) { this.query_info.page += 1; this.articles.push(...presses.data); $state.loaded(); } else { $state.complete(); } }) .catch((err) =&gt; { const toast = this.$createToast({ type: 'error', time: 2000, txt: err.message, }); toast.show(); }); }, /** * 获取文章列表 * @return {Promise} {请求文章列表的promise} */ fetchArticles() { const query_str = qs.stringify(this.query_info); return this.$http.get(`${ARTICLE}?${query_str}`, { hideLoading: true }); }, /** * 查看文章详情 * @param {String} press_id {当前的文章id} */ handleClick(press_id) { const detail_url = `${window.location.origin + window.location.pathname}#/article-detail?article_id=${press_id}`; const param = { url: detail_url, }; this.handleApp('articleDetail', JSON.stringify(param)); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_component_header.vue.html":{"id":"views_component_header.vue.html","title":"Source: views/component/header.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/component/header.vue /* * @Description: 页面头部 * @Author: kanglin * @Date: 2018-12-25 14:28:16 * @Copyright: Created by Panxsoft. */ &lt;style lang=\"less\" scoped rel=\"stylesheet/less\" type=\"text/less\" &gt; @import '~src/assets/css/common.less'; .v-com-header{ position: relative; background: #ffffff; padding: 24* @rem-per-px 40* @rem-per-px; height:48*@rem-per-px; box-shadow:0 4px 12px rgba(14,21,86,0.08); .title{ text-align: center; height:48*@rem-per-px; line-height: 48*@rem-per-px; font-size: 32*@rem-per-px; font-weight:bold; max-width: 7rem; overflow: hidden; margin: 0 auto; text-overflow: ellipsis; white-space: nowrap; } } &lt;/style&gt; &lt;template&gt; &lt;div class=\"v-com-header\"&gt; &lt;back @click.native=\"handleClick\"/&gt; &lt;h3 class=\"title\"&gt;{{ title }}&lt;/h3&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import back from 'src/views/component/back'; /** * 页面头部组件 * @vue-prop {string} [title=''] 页面标题 * @vue-computed {getTitle} 页面标题 */ export default { name: 'Header', components: { back, }, props: { title: { type: String, default() { return ''; }, }, }, data() { return { }; }, computed: { getTitle() { return this.title; }, }, methods: { /** * 处理头部返回按钮事件 * @return {undefined} */ handleClick() { this.$emit('back'); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_index.vue.html":{"id":"views_index.vue.html","title":"Source: views/index.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/index.vue /* * 工程index * @Author: ljb * @Date: 2018-11-13 15:00:41 * @Last Modified by: ljb * @Last Modified time: 2019-01-04 14:33:00 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; .v-index { width: 100%; background-color: #F9F9F9; } &lt;/style&gt; &lt;template&gt; &lt;div class=\"v-index\"&gt; &lt;!-- 区域模块组件 --&gt; &lt;component v-for=\"app_module in app_home_setting\" :key=\"app_module.layout_module_id\" :is=\"block_map[app_module.code]\" :code=\"app_module.code\" :setting=\"app_module.setting\" :layout-module-id=\"app_module.layout_module_id\" @search=\"moduleSearch\" @link=\"linkTo\"/&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import * as API_LIST from 'src/API_LIST'; import qs from 'qs'; import { getLanguageForBackEnd } from 'src/i18n'; import banner from 'src/views/module/banner-module'; import navs from 'src/views/module/navs-module'; import singleProduct from 'src/views/module/single-product-module'; import specialProduct from 'src/views/module/special-product-module'; import recommendProduct from 'src/views/module/recommend-product-module'; import articleModule from 'src/views/module/article-module'; import bestseller from 'src/views/module/bestseller-module'; import { appHandle } from 'src/views/mixins/appHandle'; import { importStyle } from 'src/utils/dom-helper'; /** * 首页 * @vue-data {Object} block_map 模块名称的映射表 * @vue-data {string} current_lang 当前语言 * @vue-data {array} app_home_setting 首页模块数组 */ export default { components: { banner, navs, singleProduct, specialProduct, recommendProduct, articleModule, bestseller, }, mixins: [appHandle], data() { return { block_map: { slideshow: 'banner', panx_app_icon_link: 'navs', latest: 'singleProduct', special: 'specialProduct', featured: 'recommendProduct', press_latest: 'articleModule', bestseller: 'bestseller', }, // 区域模块映射表 current_lang: getLanguageForBackEnd(), // 当前语言 app_home_setting: [], // 首页模块数组 }; }, created() { this.fetchModule(); }, methods: { /** * 从url读取模拟的主题 */ readMockThemeName() { const query = qs.parse(window.location.search.replace(/^\\?/, '')); return query.theme || 'default'; }, /** * 产品专区模块跳转 * @param {Object} [params={}] 需要传递的参数 */ moduleSearch(params = {}) { const queryString = qs.stringify(params); const { origin, pathname } = window.location; const url = `${origin + pathname}#/more?${queryString}`; const jsonString = JSON.stringify({ url }); this.handleApp('more', jsonString); // this.$router.push({ path: '/more', query: params }); }, /** * 跳转链接 * @param {string} href 链接地址 */ linkTo(href) { let open_url; if (!href) return; if (this.isAppProtocol(href)) { const [app_fn, query_string] = href.split('://').pop().split('?'); const params = qs.parse(query_string, { arrayFormat: 'indices' }) || {}; this.handleApp(app_fn, JSON.stringify(params)); } else if (this.isUrlProtocol(href)) { window.open(href); } else { open_url = `${window.location.protocol}//${href}`; window.open(open_url); } }, /** * 是否为正常网址协议（http/https） * @param {String} url 需要进行判断的url * @return {Boolean} true代表是正常的网址，反之不是 */ isUrlProtocol(url) { const protocol = url.split('://').shift(); const valid_protocol = ['http', 'https']; return valid_protocol.indexOf(protocol) !== -1; }, /** * 是否为app自定义协议 * @param {String} url {需要进行判断的url} * @return {Boolean} true代表是app自定义协议，反之不是 */ isAppProtocol(url) { const protocol = url.split('://').shift(); const app_valid_protocol = ['app']; return app_valid_protocol.indexOf(protocol) !== -1; }, /** * 获取首页模块 * @return {promise} 请求模块的promise */ fetchModule() { const param = { language: this.current_lang, layout_route: 'app', }; const query_str = qs.stringify(param); return this.$http.get(`${API_LIST.HOME_MODULE}?${query_str}`) .then(({ data }) =&gt; { if (data.code !== 0) throw new Error(data.error); this.app_home_setting = data.app_home_setting; importStyle(this.readMockThemeName()); }) .catch((err) =&gt; { const toast = this.$createToast({ type: 'error', time: 2000, txt: err.message, }); toast.show(); }); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_module_navs-module.vue.html":{"id":"views_module_navs-module.vue.html","title":"Source: views/module/navs-module.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/module/navs-module.vue /* * 网格导航模块 * @Author: ljb * @Date: 2018-11-15 17:20:45 * @Last Modified by: kanglin * @Last Modified time: 2019-01-04 16:27:55 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; /*网格导航样式*/ .grid-navs-area { padding-top: 16*@rem-per-px; margin-bottom: 10*@rem-per-px; } /*网格导航样式 END*/ &lt;/style&gt; &lt;template&gt; &lt;!-- 网格导航栏 --&gt; &lt;section class=\"grid-navs-area v-com-nav-module white-bg\"&gt; &lt;gridNavs :navs=\"getNavs\" @link=\"linkTo\"/&gt; &lt;/section&gt; &lt;/template&gt; &lt;script&gt; import gridNavs from 'src/views/component/grid-navs'; /** * 网格导航模块 * @vue-prop {Object} [setting={}] 后端返回的组件数据 * @vue-computed {Array} getNavs 导航列表 */ export default { name: 'NavModule', components: { gridNavs, }, props: { setting: { type: Object, default() { return {}; }, }, }, data() { return { }; }, computed: { getNavs() { return this.setting ? this.setting.icons : []; }, }, methods: { /** * 跳转链接 * @param {String} href {链接地址} * @return {undefined} */ linkTo(href) { this.$emit('link', href); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_module_recommend-product-module.vue.html":{"id":"views_module_recommend-product-module.vue.html","title":"Source: views/module/recommend-product-module.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/module/recommend-product-module.vue /* * 最新单品区域模块 * @Author: ljb * @Date: 2018-11-15 17:20:45 * @Last Modified by: kanglin * @Last Modified time: 2019-01-04 16:28:51 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; /*推荐商品*/ .recommend-product-area { width: 100%; .title-area { padding: 0 40*@rem-per-px; } .product-lists { padding: 0 12*@rem-per-px 12*@rem-per-px 14*@rem-per-px; white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; .product { vertical-align: top; margin-right: 28*@rem-per-px; } } } /*推荐商品 END*/ &lt;/style&gt; &lt;template&gt; &lt;!-- 推荐商品区域 --&gt; &lt;section v-if=\"getProducts &amp;&amp; getProducts.length &gt; 0\" class=\"recommend-product-area white-bg\"&gt; &lt;div class=\"title-area\"&gt; &lt;blockTitle :show-icon=\"true\" :text=\"$t('home.recommend_product')\" @click.native=\"$emit('search',{ search_type: code, layout_module_id: layoutModuleId, title: $t('home.recommend_product') })\"/&gt; &lt;/div&gt; &lt;div class=\"product-lists\"&gt; &lt;recommendProduct v-for=\"product in getProducts\" :key=\"product.product_id\" :product-image=\"product.product_image\" :product-title=\"product.product_name\" :product-price=\"product.currency_settle_price || product.price\" :line-price=\"lineThroughPrice(product)\" :left-symbol=\"product.symbol_left\" :right-symbol=\"product.symbol_right\" class=\"product\" @click.native=\"handleApp('productDetail', JSON.stringify({id: product.product_id}))\"/&gt; &lt;/div&gt; &lt;/section&gt; &lt;/template&gt; &lt;script&gt; import blockTitle from 'src/views/component/title'; import recommendProduct from 'src/views/component/recommend-product'; import { appHandle } from 'src/views/mixins/appHandle'; /** * 最新单品区域模块 * @vue-prop {Object} [setting={}] 后端返回的组件数据 * @vue-prop {String} code 组件名称 * @vue-prop {Number} layoutModuleId 组件ID * @vue-computed {Array} getProducts 商品列表 */ export default { name: 'RecommendModule', components: { blockTitle, recommendProduct, }, mixins: [appHandle], props: { setting: { type: Object, default() { return {}; }, }, code: { type: String, required: true, }, layoutModuleId: { type: Number, required: true, }, }, data() { return { }; }, computed: { getProducts() { return this.setting ? this.setting.recommend_products : []; }, }, methods: { /** * 实际价格小于原价显示划线价否则不显示 * @parms {string} currency_settle_price 实际价格 * @parms {string} price 原价价格 */ lineThroughPrice({ currency_settle_price, price }) { if (parseInt(currency_settle_price, 10) &lt; parseInt(price, 10)) { return price; } return ''; }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_module_special-product-module.vue.html":{"id":"views_module_special-product-module.vue.html","title":"Source: views/module/special-product-module.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/module/special-product-module.vue /* * 特价商品模块 * @Author: ljb * @Date: 2018-11-15 17:20:45 * @Last Modified by: kanglin * @Last Modified time: 2019-01-04 16:30:16 */ &lt;style lang=\"less\" rel=\"stylesheet/less\" type=\"text/less\" scoped&gt; @import '~src/assets/css/common.less'; /*特价商品样式*/ .special-product-area { padding: 0 40*@rem-per-px 32*@rem-per-px; margin-bottom: 16*@rem-per-px; .product:not(:last-of-type) { margin-bottom: 32*@rem-per-px; } } /*特价商品样式 END*/ &lt;/style&gt; &lt;template&gt; &lt;section v-if=\"getProducts &amp;&amp; getProducts.length &gt; 0\" class=\"special-product-area white-bg\"&gt; &lt;blockTitle :text=\"$t('home.special_product')\" @click.native=\"$emit('search',{ search_type: code, layout_module_id: layoutModuleId, title: $t('home.special_product')})\"/&gt; &lt;div class=\"product-lists\"&gt; &lt;specialProduct v-for=\"product in getProducts\" :key=\"product.product_id\" :product-image=\"product.product_image\" :product-title=\"product.product_name\" :product-price=\"product.currency_settle_price || product.price\" :line-price=\"lineThroughPrice(product)\" :left-symbol=\"product.symbol_left\" :right-symbol=\"product.symbol_right\" class=\"product\" @click.native=\"handleApp('productDetail', JSON.stringify({id: product.product_id}))\"/&gt; &lt;/div&gt; &lt;/section&gt; &lt;/template&gt; &lt;script&gt; import blockTitle from 'src/views/component/title'; import specialProduct from 'src/views/component/special-product'; import { appHandle } from 'src/views/mixins/appHandle'; /** * 特价商品模块 * @vue-prop {Object} [setting={}] 后端返回的组件数据 * @vue-prop {String} code 组件名称 * @vue-prop {Number} layoutModuleId 组件ID * @vue-computed {Array} getProducts 商品列表 */ export default { name: 'SpecialModule', components: { blockTitle, specialProduct, }, mixins: [appHandle], props: { setting: { type: Object, default() { return {}; }, }, code: { type: String, required: true, }, layoutModuleId: { type: Number, required: true, }, }, data() { return { }; }, computed: { getProducts() { return this.setting ? this.setting.special_products : []; }, }, methods: { /** * @parms {string} special_price 特价 * @parms {string} currency_settle_price 实际价格 * @parms {string} price 原价价格 */ lineThroughPrice({ special_price, price }) { return special_price ? price : ''; }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"views_more_views.vue.html":{"id":"views_more_views.vue.html","title":"Source: views/more/views.vue","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: views/more/views.vue /* * @Description: 更多商品 * @Author: kanglin * @Date: 2018-12-25 14:26:33 * @Copyright: Created by Panxsoft. */ &lt;style lang=\"less\" scoped rel=\"stylesheet/less\" type=\"text/less\" &gt; @import '~src/assets/css/common.less'; .v-com-more{ .header{ position: fixed; width: 100%; z-index: 999; } .body{ background-color: #F9F9F9; padding-top: 96*@rem-per-px; .poducts{ display: flex; justify-content: center; flex-wrap: wrap; .product-item{ // display: inline-block; margin: 8*@rem-per-px 4*@rem-per-px; } } .odd:after { content: \"\"; flex: auto; } } } &lt;/style&gt; &lt;template&gt; &lt;div class=\"v-com-more\"&gt; &lt;div class=\"header\"&gt; &lt;page-header :title=\"title\" @back=\"backToHome\"/&gt; &lt;/div&gt; &lt;div class=\"body\"&gt; &lt;ul :class=\"{ odd :products.length%2}\" class=\"poducts\"&gt; &lt;li v-for=\"item in products\" :key=\"item.product_id\" class=\"product-item\"&gt; &lt;more-product-card :src=\"item.image\" :title=\"item.name\" :price=\"item.currency_settle_price || item.price\" :left-symbol=\"item.symbol_left\" :right-symbol=\"item.symbol_right\" @click.native=\"handleApp('productDetail', JSON.stringify({id: item.product_id}))\" /&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;infinite-loading :distance=\"500\" @infinite=\"infiniteHandler\"&gt; &lt;div slot=\"spinner\"/&gt; &lt;div slot=\"no-more\" class=\"no-more\"&gt;{{ $t('common.no_more_data') }}&lt;/div&gt; &lt;/infinite-loading&gt; &lt;/div&gt; &lt;/template&gt; &lt;script&gt; import moreProductCard from 'src/views/component/more-product-card'; import header from 'src/views/component/header'; import { APP_PRODUCT } from 'src/API_LIST'; import { appHandle } from 'src/views/mixins/appHandle'; /** * 更多商品（商品专区） * @vue-data {array} products - 商品数组 * @vue-data {Object} params - 分页参数对象 * @vue-data {number} [params.per_page=10] - 每页显示数 * @vue-data {number} [params.page=10] - 当前页码 * @vue-data {null} [params.search_type=null] - 搜索类型 * @vue-data {number} [params.layout_module_id=null] - 模块id * @vue-data {string} title - 标题 */ export default { name: 'More', components: { 'page-header': header, moreProductCard, }, mixins: [appHandle], data() { return { products: [], params: { per_page: 10, page: 1, search_type: null, layout_module_id: null, }, title: '', }; }, created() { this.parseUrlParams(this.$route); }, methods: { /** * 处理返回事件 */ backToHome() { this.handleApp('back'); }, /** * 解析url参数 * @param {Object} route * @return {object} params */ parseUrlParams(route) { const { search_type, layout_module_id, title } = route.query; if (this.validateParams(search_type, layout_module_id)) { this.params.search_type = search_type; this.params.layout_module_id = layout_module_id; this.title = title; } else { const toast = this.$createToast({ type: 'error', time: 2000, txt: this.$t('common.error_params'), }); toast.show(); window.setTimeout(this.backToHome, 2000); } }, /** * 校验参数 */ validateParams(search_type, layout_module_id) { return search_type &amp;&amp; layout_module_id; }, /** * 请求更多商品 * @param {object} params * @return undefined */ fetchMoreProducts(params) { return this.$http(APP_PRODUCT, { params }) .then(({ data }) =&gt; { if (data.code !== 0) { throw new Error(data.error); } return data; }) .catch((error) =&gt; { const toast = this.$createToast({ type: 'error', time: 2000, txt: error.message, }); toast.show(); }); }, infiniteHandler($state) { this.fetchMoreProducts(this.params) .then((data) =&gt; { if (data.products.current_page &gt; data.products.last_page) { $state.complete(); } else { this.products.push(...data.products.data); const page = data.products.current_page + 1; this.params.page = page; $state.loaded(); } }); }, }, }; &lt;/script&gt; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"handleRouter.js.html":{"id":"handleRouter.js.html","title":"Source: handleRouter.js","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Source: handleRouter.js /* * 路由组件的处理方法 * @Author: ljb * @Date: 2018-11-09 16:48:29 * @Last Modified by: kanglin * @Last Modified time: 2018-11-22 18:15:49 */ /* eslint-disable-next-line import/extensions */ import Toast from 'cube-ui/lib/toast'; import { $t } from 'src/i18n'; import Util from './libs/util'; let loading_toast = null; /** * 开启loading */ function startLoading() { const t = Toast.$create({ time: 0, txt: $t('common.wait'), }); t.show(); loading_toast = t; } function closeLoading() { loading_toast.hide(); } // 路由处理方法 const handleRouter = { // 路由切换前的处理 before(to, from, next) { // reset title startLoading(); Util.title(to.meta.title); return next(); }, // 路由切换后的处理 after() { // Vue.Toast.$loading.close(); closeLoading(); window.scrollTo(0, 0); }, }; export default handleRouter; × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"global.html":{"id":"global.html","title":"Global","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Global Members &lt;constant&gt; appHandle 方法: productSearch 首页导航查询的方法名 Source: views/mixins/appHandle.js, line 14 See: https://panxsoft.coding.net/p/Direwolf-Web/task/172941 &lt;constant&gt; current_locale 读取本地语言 Source: i18n/index.js, line 18 &lt;constant&gt; i18n 配置 i18n Source: i18n/index.js, line 31 loading_toast 承接loading_toast的空对象 Source: utils/axios-interceptors.js, line 6 &lt;constant&gt; messages 语言文件配置 Source: i18n/index.js, line 23 Methods $t(path, options) 翻译 Parameters: Name Type Description path string options object Source: i18n/index.js, line 51 axiosRequestReject(error) 对请求错误处理后件 Parameters: Name Type Description error Object axios请求报错后返回的error对象 Source: utils/axios-interceptors.js, line 27 Returns: 返回promise.reject Type Promise.&lt;*&gt; axiosRequestResolve(config) 请求发出前处理 Parameters: Name Type Description config Object axios请求前的配置对象 Source: utils/axios-interceptors.js, line 12 Returns: axios请求前的配置对象 Type Object axiosResponseReject(error) 响应错误处理 Parameters: Name Type Description error Object axios响应错误后的错误对象 Source: utils/axios-interceptors.js, line 49 Returns: Type Promise.&lt;*&gt; axiosResponseResolve(response) 对响成功处理 Parameters: Name Type Description response Object axios响应成功之后的返回体 Source: utils/axios-interceptors.js, line 36 Returns: axios响应成功之后的返回体 Type Object conversionTime(date) 毫秒转化时分秒 Parameters: Name Type Description date Number {需要转化的毫秒} Source: utils/utils.js, line 152 Returns: Type undefined delay(callback, millsecond) 包装一个延时函数\b Parameters: Name Type Description callback function millsecond int Source: utils/helper.js, line 16 deleteEmptyValue(param) 去除对象中的空值 Parameters: Name Type Description param Object {需要进行处理的对象} Source: utils/utils.js, line 130 Returns: {去除完毕的对象} Type Object formaturl() 网址格式化 Source: utils/utils.js, line 53 Returns: {格式化网址之后得到的参数对象} Type Object getCurrentDate() 获取当前的时间 Source: utils/utils.js, line 5 Returns: {格式化后的当前时间} Type string getCurrentLocale() 解析当前地区 Source: utils/helper.js, line 29 Returns: locale Type string getHiddenProp() 读取hidden属性 Source: utils/helper.js, line 76 Returns: Type String | null getLanguage() 获取当前语言 Source: i18n/index.js, line 59 Returns: language Type string getLanguageForBackEnd() 后端的英文是 en , 中文是 zh-CN. Source: i18n/index.js, line 86 getLanguageOptions() 获取语言选项 Source: i18n/index.js, line 79 Returns: language Type string getUploadImage(file, _image) 图片上传预览 Parameters: Name Type Description file file {图片文件} _image Object {$refs获取节点} Source: utils/utils.js, line 115 getVisibilityChangeEventName() 获取 visibilityChange 的事件在当前浏览器的时间名; Source: utils/helper.js, line 92 Returns: EventName Type String | null imgPreLoad(src_arrs) 图片预加载 Parameters: Name Type Description src_arrs array {图片链接数组} Source: utils/utils.js, line 74 Returns: {加载后的图片数组} Type array importStyle(styleName) 动态创建style标签并插入head标签里面 Parameters: Name Type Description styleName String {需要插入的style标签名} Source: utils/dom-helper.js, line 21 isContained(a, b) 判断a数组是否包含b数组 Parameters: Name Type Description a array {判断的a数组} b array {判断的b数组} Source: utils/utils.js, line 94 Returns: {true代表包含，false代表不包含} Type Boolean isHidden() 获取当前页面hide状态 Source: utils/helper.js, line 114 parseLanguageParameter() 解析语言参数 优先选择 url search 然后是浏览器环境 (navigator.languages) 最后默认zh-CN Source: utils/helper.js, line 49 Returns: language zh-CN OR en-US Type string parseQueryString() 解析query string Source: utils/helper.js, line 67 Returns: query information Type object resizeModal() 调整模态框的水平居中 Source: utils/utils.js, line 167 Returns: Type undefined setLanguageOptions() 设置语言 Source: i18n/index.js, line 71 Returns: language Type string setLocale(locale) 切换语言 Parameters: Name Type Description locale string Source: i18n/index.js, line 41 setMinHeightToInnerHeight(elem) 设置当前节点高度为屏幕可视高度 Parameters: Name Type Description elem Object {节点对象} Source: utils/dom-helper.js, line 13 startLoading() 开启loading Source: handleRouter.js, line 19 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"modules.list.html":{"id":"modules.list.html","title":"Modules","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Modules × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"index.html":{"id":"index.html","title":"Index","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading #App_webview #启动 本地运行：npm run dev-proxy 编译：npm run watch × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-app.html":{"id":"module-app.html","title":"Module: app","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: app Data Name Type Default value Description show_btn Boolean false 控制返回顶部的按钮的显隐 Methods btnShowControl() 返回顶部按钮的显隐控制 Source: app.vue, line 72 initListener() 初始化事件监听 Source: app.vue, line 65 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-article-card.html":{"id":"module-article-card.html","title":"Module: article-card","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: article-card 发现列表卡片组件 Props Name Type Default value Required? Description title string '' No 文章标题 date string '' No 文章时间 count number 0 No 阅读量 cover string - Yes 封面图片地址 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-article-detail.html":{"id":"module-article-detail.html","title":"Module: article-detail","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: article-detail 新闻详情 Data Name Type Default value Description article_detail Object {} 新闻详情 recommend_products array [] 推荐商品数组 Computed Name Type Description articleContent Object 文章详细内容 articleReads number 文章阅读数 Methods backToHome() 处理返回事件 Source: views/article-detail.vue, line 148 fetchArticleDetailAndProduct() 获取推荐商品列表 Source: views/article-detail.vue, line 165 Returns: {请求推荐商品的promise} Type Promise getArticleId() 获取当前查看的新闻的详情id Source: views/article-detail.vue, line 156 Returns: {新闻的详情id} Type String × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-article-item.html":{"id":"module-article-item.html","title":"Module: article-item","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: article-item 首页文章列表item Props Name Type Default value Required? Description title string '' No 文章标题 count number 0 No 阅读量 thumb string '' No 封面图片地址 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-article-module.html":{"id":"module-article-module.html","title":"Module: article-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: article-module Props Name Type Default value Required? Description setting Object {} No 包含新闻数组的对象 Computed Name Type Description articles array 最新新闻 Methods watchDetail(press_id) 查看新闻详情 Parameters: Name Type Description press_id String {当前查看的新闻id} Source: views/module/article-module.vue, line 95 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-back.html":{"id":"module-back.html","title":"Module: back","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: back 头部返回按钮组件 Data Name Type Default value Description back_ion string 'src/assets/icon/back_icon_normal.svg' 返回按钮ICON × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-banner-module.html":{"id":"module-banner-module.html","title":"Module: banner-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: banner-module banner轮播图模块 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 Data Name Type Default value Description swiperOption Object - swiper的配置 swiperOption.height string 4.68px 组件高度 swiperOption.autoHeight Boolean true 是否高度随内容变化 swiperOption.pagination.el Object .swiper-pagination 分页器元素 swiperOption.autoplay.delay number 2500 过渡时间 swiperOption.autoplay.disableOnInteraction Boolean false 是否禁止autoplay swiperOption.loop Boolean false 是否循环 swiperOption.on.click function handleClick 处理点击的回调 Computed Name Type Description getBanner array 返回banner列表数据 Methods handleClick() 点击转跳 Source: views/module/banner-module.vue, line 115 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-bestseller-module.html":{"id":"module-bestseller-module.html","title":"Module: bestseller-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: bestseller-module 热卖模块组件 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 code String - Yes 组件名称 layoutModuleId Number - Yes 组件ID Computed Name Type Description hasSetting Boolean 是否有有后端的Setting数据 getProducts Array 商品列表 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-bestseller-product-card.html":{"id":"module-bestseller-product-card.html","title":"Module: bestseller-product-card","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: bestseller-product-card 热卖商品卡片组件 Props Name Type Default value Required? Description src string null No 封面图片 title String '' No 商品标题 leftSymbol string '' No 货币符号 rightSymbol string ' No 货币符号 price string '0.00' No 商品价格 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-detail-recommend-module.html":{"id":"module-detail-recommend-module.html","title":"Module: detail-recommend-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: detail-recommend-module 文章详情里的推荐商品模块 Props Name Type Default value Required? Description products Array - Yes 商品列表 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-discovery.html":{"id":"module-discovery.html","title":"Module: discovery","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: discovery 发现页面 Data Name Type Default value Description articles array [] 文章列表的数组 query_info Object - 分页搜索的参数对象 query_info.page number 1 分页搜索的页数 query_info.per_page number 5 分页搜索的每页显示数 query_info.language string zh-cn 分页搜索的语言参数 Methods fetchArticles() 获取文章列表 Source: views/discovery.vue, line 129 Returns: {请求文章列表的promise} Type Promise handleClick(press_id) 查看文章详情 Parameters: Name Type Description press_id String {当前的文章id} Source: views/discovery.vue, line 139 infiniteHandler($state) 无限加载的handle函数 Parameters: Name Type Description $state Object {插件的状态管理} Source: views/discovery.vue, line 102 isLastPage(page, last_page) 是否最后一页 Parameters: Name Type Description page Number | String {当前需要判断的页码} last_page Number | String {最后一页页码} Source: views/discovery.vue, line 94 Returns: {true代表是最后一页} Type Boolean × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-grid-navs.html":{"id":"module-grid-navs.html","title":"Module: grid-navs","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: grid-navs 首页导航栏(网格navs组件) Props Name Type Default value Required? Description navs Array - Yes navs数据对象 navCount Number 5 No 一行显示多少个nav × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-header.html":{"id":"module-header.html","title":"Module: header","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: header 页面头部组件 Props Name Type Default value Required? Description title string '' No 页面标题 Computed Name Type Description 页面标题 getTitle - Methods handleClick() 处理头部返回按钮事件 Source: views/component/header.vue, line 73 Returns: Type undefined × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-index.html":{"id":"module-index.html","title":"Module: index","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: index 首页 Data Name Type Default value Description block_map Object - 模块名称的映射表 current_lang string - 当前语言 app_home_setting array - 首页模块数组 Methods fetchModule() 获取首页模块 Source: views/index.vue, line 160 Returns: 请求模块的promise Type promise isAppProtocol(url) 是否为app自定义协议 Parameters: Name Type Description url String {需要进行判断的url} Source: views/index.vue, line 148 Returns: true代表是app自定义协议，反之不是 Type Boolean isUrlProtocol(url) 是否为正常网址协议（http/https） Parameters: Name Type Description url String 需要进行判断的url Source: views/index.vue, line 135 Returns: true代表是正常的网址，反之不是 Type Boolean linkTo(href) 跳转链接 Parameters: Name Type Description href string 链接地址 Source: views/index.vue, line 113 moduleSearch( [params]) 产品专区模块跳转 Parameters: Name Type Argument Default Description params Object &lt;optional&gt; {} 需要传递的参数 Source: views/index.vue, line 101 readMockThemeName() 从url读取模拟的主题 Source: views/index.vue, line 92 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-more-product-card.html":{"id":"module-more-product-card.html","title":"Module: more-product-card","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: more-product-card 更多商品卡片 Props Name Type Default value Required? Description src string null No 封面图片 title String '' No 商品标题 leftSymbol string '' No 货币符号 rightSymbol string ' No 货币符号 price string '0.00' No 商品价格 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-navs-module.html":{"id":"module-navs-module.html","title":"Module: navs-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: navs-module 网格导航模块 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 Computed Name Type Description getNavs Array 导航列表 Methods linkTo(href) 跳转链接 Parameters: Name Type Description href String {链接地址} Source: views/module/navs-module.vue, line 68 Returns: Type undefined × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-recommend-product.html":{"id":"module-recommend-product.html","title":"Module: recommend-product","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: recommend-product 推荐商品部分商品组件 Props Name Type Default value Required? Description productImage string null No 封面图片 productTitle String '' No 商品标题 productPrice String|Number '' No 商品价格 linePrice String|Number - Yes 划线价 leftSymbol string '' No 货币符号 rightSymbol string ' No 货币符号 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-recommend-product-module.html":{"id":"module-recommend-product-module.html","title":"Module: recommend-product-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: recommend-product-module 最新单品区域模块 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 code String - Yes 组件名称 layoutModuleId Number - Yes 组件ID Computed Name Type Description getProducts Array 商品列表 Methods lineThroughPrice() 实际价格小于原价显示划线价否则不显示 Source: views/module/recommend-product-module.vue, line 113 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-single-product.html":{"id":"module-single-product.html","title":"Module: single-product","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: single-product 单品部分的商品组件 Props Name Type Default value Required? Description productImage string null No 封面图片 productTitle String '' No 商品标题 productPrice String|Number '' No 商品价格 linePrice String|Number - Yes 划线价 leftSymbol string '' No 货币符号 rightSymbol string ' No 货币符号 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-single-product-module.html":{"id":"module-single-product-module.html","title":"Module: single-product-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: single-product-module 最新单品模块 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 code String - Yes 组件名称 layoutModuleId Number - Yes 组件ID Computed Name Type Description getProducts Array 商品列表 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-special-product.html":{"id":"module-special-product.html","title":"Module: special-product","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: special-product 特价商品部分商品组件 Props Name Type Default value Required? Description productImage string null No 封面图片 productTitle String '' No 商品标题 productPrice String|Number '' No 商品价格 linePrice String|Number - Yes 划线价 leftSymbol string '' No 货币符号 rightSymbol string ' No 货币符号 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-special-product-module.html":{"id":"module-special-product-module.html","title":"Module: special-product-module","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: special-product-module 特价商品模块 Props Name Type Default value Required? Description setting Object {} No 后端返回的组件数据 code String - Yes 组件名称 layoutModuleId Number - Yes 组件ID Computed Name Type Description getProducts Array 商品列表 Methods lineThroughPrice() Source: views/module/special-product-module.vue, line 98 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-title.html":{"id":"module-title.html","title":"Module: title","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: title 组件标题组件 Props Name Type Default value Required? Description text string - Yes 标题名称 showIcon Boolean - Yes 是否显示更多按钮 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "},"module-views.html":{"id":"module-views.html","title":"Module: views","body":" Documentation Modules apparticle-cardarticle-detailarticle-itemarticle-modulebackbanner-modulebestseller-modulebestseller-product-carddetail-recommend-modulediscoverygrid-navsheaderindexmore-product-cardnavs-modulerecommend-productrecommend-product-modulesingle-productsingle-product-modulespecial-productspecial-product-moduletitleviews Global $tappHandleaxiosRequestRejectaxiosRequestResolveaxiosResponseRejectaxiosResponseResolveconversionTimecurrent_localedelaydeleteEmptyValueformaturlgetCurrentDategetCurrentLocalegetHiddenPropgetLanguagegetLanguageForBackEndgetLanguageOptionsgetUploadImagegetVisibilityChangeEventNamei18nimgPreLoadimportStyleisContainedisHiddenloading_toastmessagesparseLanguageParameterparseQueryStringresizeModalsetLanguageOptionssetLocalesetMinHeightToInnerHeightstartLoading Module: views 更多商品（商品专区） Data Name Type Default value Description products array - 商品数组 params Object - 分页参数对象 params.per_page number 10 每页显示数 params.page number 10 当前页码 params.search_type null null 搜索类型 params.layout_module_id number null 模块id title string - 标题 Methods backToHome() 处理返回事件 Source: views/more/views.vue, line 117 fetchMoreProducts(params) 请求更多商品 Parameters: Name Type Description params object Source: views/more/views.vue, line 155 Returns: undefined parseUrlParams(route) 解析url参数 Parameters: Name Type Description route Object Source: views/more/views.vue, line 126 Returns: params Type object validateParams() 校验参数 Source: views/more/views.vue, line 146 × Search results Close Documentation generated by JSDoc 3.5.5 on 2019-01-04T18:17:00+08:00 using the DocStrap template. "}}
    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            Searcher.init();
        });

        $(window).on("message", function(msg) {
            var msgData = msg.originalEvent.data;

            if (msgData.msgid != "docstrap.quicksearch.start") {
                return;
            }

            var results = Searcher.search(msgData.searchTerms);

            window.parent.postMessage({"results": results, "msgid": "docstrap.quicksearch.done"}, "*");
        });
    </script>
</body>
</html>
